<template>
  <div class="home-container">
    <el-container>
      <el-main>
        <div class="home-content">
          <el-card shadow="never" class="cardInfo">
            <el-row class="portal-row">
              <el-col :span="10" class="portal-col">
                <div class="item-content">
                  <el-card shadow="never" class="itemCardInfo">
                    <div class="bg-white-panel">客户情况</div>
                    <div class="dis al_item">
                      <div class="nav-item">
                        <div class="dis al_item dis_ju_spb item-header">
                          <div class="cursor flex_1 dis al_item">
                            <el-row :gutter="40">
                              <el-col :span="8" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">总客户数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.totalMemberNum }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="8" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro f2">
                                    <p class="intro-title text-elepsis ng-binding">当年新增</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.newAddMemberNumOfThisYear }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="8" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">当月新增</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.newAddMemberNumOfThisMonth }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="8" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">当日新增</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.totalPointNum }}</p>
                                  </div>
                                </div>
                              </el-col>
                            </el-row>
                          </div>
                        </div>
                      </div>
                    </div>
                  </el-card>
                </div>
              </el-col>
              <el-col :span="7" class="portal-col">
                <div class="item-content">
                  <el-card shadow="never" class="itemCardInfo">
                    <div class="bg-white-panel">客群情况</div>
                    <div class="dis al_item">
                      <div class="nav-item">
                        <div class="dis al_item dis_ju_spb item-header">
                          <div class="cursor flex_1 dis al_item">
                            <el-row :gutter="40">
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">客群总数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.totalMemberNum }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">当月入群数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.newAddMemberNumOfThisMonth }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">当日入群数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveyUsage.totalPointNum }}</p>
                                  </div>
                                </div>
                              </el-col>
                            </el-row>
                          </div>
                        </div>
                      </div>
                    </div>
                  </el-card>
                </div>
              </el-col>
              <el-col :span="7" class="portal-col">
                <div class="item-content">
                  <el-card shadow="never" class="itemCardInfo">
                    <div class="bg-white-panel">营销情况</div>
                    <div class="dis al_item">
                      <div class="nav-item">
                        <div class="dis al_item dis_ju_spb item-header">
                          <div class="cursor flex_1 dis al_item">
                            <el-row :gutter="40">
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">当月聊天总数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveySales.totalMemberSalesAmount }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">当月消息总数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveySales.totalMemberSalesAmountOfThisYear }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">今日聊天总数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveySales.totalMemberSalesAmount }}</p>
                                  </div>
                                </div>
                              </el-col>
                              <el-col :span="12" class="list-item-box">
                                <div class="list-item clearfix">
                                  <div class="item-intro fl">
                                    <p class="intro-title text-elepsis ng-binding">今日消息总数</p>
                                    <p class="intro-number text-number-elepsis ng-binding">{{ memberSurvey.surveySales.totalMemberSalesAmountOfThisYear }}</p>
                                  </div>
                                </div>
                              </el-col>
                            </el-row>
                          </div>
                        </div>
                      </div>
                    </div>
                  </el-card>
                </div>
              </el-col>
            </el-row>
            <el-row class="portal-row">
              <el-col :span="8" class="portal-col">
                <div class="item-content">
                  <el-card shadow="never" class="cardInfo">
                    <div class="bg-white-panel">等级会员贡献</div>
                    <div class="al_item">
                      <div class="nav-item">
                        <vxe-table
                          ref="xTree"
                          border
                          row-key
                          resizable
                          highlight-hover-row
                          :auto-resize="true"
                          :data="memberSurvey.surveyLevelSalesSorts"
                          width
                          show-overflow
                          max-height="360"
                          row-id="id"
                          highlight-current-row
                          text-algin="center"
                          :print-config="{}"
                          header-align="center"
                        >
                          <vxe-table-column type="seq" width="50" align="center" title="排名" />
                          <vxe-table-column field="levelName" min-width="100" align="left" title="等级" />
                          <vxe-table-column field="totalMemberNum" min-width="90" align="center" title="会员数" />
                          <vxe-table-column field="totalMemberAmount" width="120" align="center" title="销售额" />
                        </vxe-table>
                      </div>
                    </div>
                  </el-card>
                </div>
              </el-col>
              <el-col :span="8" class="portal-col">
                <div class="item-content">
                  <el-card shadow="never" class="cardInfo">
                    <div class="bg-white-panel">分群会员贡献</div>
                    <div class="al_item">
                      <div class="nav-item">
                        <vxe-table
                          ref="xTree"
                          border
                          row-key
                          resizable
                          highlight-hover-row
                          :auto-resize="true"
                          :data="memberSurvey.surveyGroupSalesSorts"
                          width
                          show-overflow
                          min-height="360"
                          row-id="id"
                          highlight-current-row
                          text-algin="center"
                          :print-config="{}"
                          header-align="center"
                        >
                          <vxe-table-column type="seq" width="50" align="center" title="排名" />
                          <vxe-table-column field="groupName" min-width="100" align="center" title="人群名称" />
                          <vxe-table-column field="totalMemberNum" min-width="100" align="center" title="会员数" />
                          <vxe-table-column field="totalMemberAmount" width="120" align="center" title="销售额" />
                        </vxe-table>
                      </div>
                    </div>
                  </el-card>
                </div>
              </el-col>
              <el-col :span="8" class="portal-col">
                <div class="item-content">
                  <el-card shadow="never" class="cardInfo">
                    <div class="bg-white-panel">标签会员贡献</div>
                    <div class="al_item">
                      <div class="nav-item">
                        <vxe-table
                          ref="xTree"
                          border
                          row-key
                          resizable
                          highlight-hover-row
                          :auto-resize="true"
                          :data="memberSurvey.surveyTagsSalesSorts"
                          width
                          show-overflow
                          max-height="360"
                          row-id="id"
                          highlight-current-row
                          text-algin="center"
                          :print-config="{}"
                          header-align="center"
                        >
                          <vxe-table-column type="seq" width="50" align="center" title="排名" />
                          <vxe-table-column field="tagsName" min-width="100" align="center" title="标签名称" />
                          <vxe-table-column field="totalMemberNum" min-width="100" align="center" title="会员数" />
                          <vxe-table-column field="totalMemberAmount" width="120" align="center" title="销售额" />
                        </vxe-table>
                      </div>
                    </div>
                  </el-card>
                </div>
              </el-col>
            </el-row>
          </el-card>
        </div>
      </el-main>
    </el-container>
  </div>
</template>

<script>

export default {
  data() {
    return {
      memberSurvey: {
        surveyUsage: {
          totalMemberNum: '0',
          newAddMemberNumOfThisYear: '0',
          newAddMemberNumOfThisMonth: '0',
          totalPointNum: '0',
          totalUsedPointNum: '0'
        },
        surveySales: {
          totalMemberSalesAmount: '0.00',
          totalMemberSalesAmountOfThisYear: '0.00',
          totalMemberSalesAmountOfThisMonth: '0.00',
          pricePerCustomer: '0.00',
          pricePerCustomerOfThisYear: '0.00',
          pricePerCustomerOfThisMonth: '0.00'
        },
        surveyLevelSalesSorts: [{
          levelName: '',
          totalMemberNum: '0',
          totalMemberAmount: '0'
        }],
        surveyGroupSalesSorts: [{
          groupName: '',
          totalMemberNum: '0',
          totalMemberAmount: '0.00'
        }],
        surveyTagsSalesSorts: [{
          tagsName: '',
          totalMemberNum: '0',
          totalMemberAmount: '0.00'
        }]
      }
    }
  },
  created() {
    this.getMemberOverall()
  },
  methods: {
    getMemberOverall() {

    }
  }
}
</script>

<style lang="scss">
.home-container {
  background: #fff;
  padding: -10px;
  border-radius: 3px;
  overflow: hidden;
  .cardInfo {
    width: 100%;
     overflow: auto;
  }
  .home-content {
    overflow-x: hidden;
    overflow-y: hidden;
    height: 650px;
    border-radius:5px;
    display:flex;
    .portal-row {
        position: relative;
        padding: 4px 0 4px 0;
        display:flex;
        flex-wrap: wrap;
        .portal-col {
          position:relative;
          padding: 0 4px 0 4px;
          display: inline-block;
        }
     }
  }
}
.nav-item {
  font-size: 14px;
  background: #fff;
  border: 0px solid #e3e2e5;
  border-radius: 4px;
  margin-bottom: 1px;
  width: 100%;
  display: inline-block;
  &:nth-child(odd) {
    margin-right: 2px;
    font-size: 14px;
    color: #595961;
  }

  .item-header {
    border-radius: 4px 4px 0 0;
    line-height: 39px;
    padding: 0 2px 0 1px;
  }

  .item-content {
    background: #d8d8d8;
    padding-top: 2px;
    border-radius: 3px;
    height: 100%;
    .itemCardInfo{
      width: 100%;
      display: inline-block;
    }
  }
}

.center-form-item {
  font-size: 14px;
  margin-left: 4px;
  vertical-align: middle;
  .el-form-item__label, .el-form-item__content, .el-radio__label, .el-button, .el-checkbox .el-checkbox__label {
    font-size: 13px;
    color: #172161;
  }
  .el-input-number.is-without-controls.el-input__inner{
    width: 20px;
    height: 14px;
  }
  .el-input.is-without-controls.el-input__inner{
    height: 14px;
  }
  .el-date-picker{
    width: 100px;
  }
  .form-item-input{
    min-height: 14px;
    width: 250px;
    font-size: 12px;
  }
  .input-class{
    .el-input__inner{
      height: 10px;
    }
  }
  .form-item-title{
    vertical-align: middle;
    padding-left: 4px;
    padding-right: 4px;
    color: #666;
  }
  .info-setting {
    margin-left: 15px;
    color: #0000FF;
    text-align: right;
    cursor: hand;
  }
  .flex-just{
    vertical-align: middle;
    width: 80px;
  }
}
.list-item-box {
  margin-bottom: 1px;
}
.list-item {
    position: relative;
    border: 0px solid #dedde1;
    display: inline-block;
    height: 60px;
    width: 100%;
    .item-intro{
      width: 100%;
      padding-left: 1px;
      letter-spacing: 0.1px;
      .intro-title {
        padding-top: 8px;
        font-size: 14px;
        line-height: 24px;
        text-align: center;
        color: #595961;
        margin: -4px 0 0;
        font-weight: 700;
        letter-spacing: 1px;
      }
      .text-elepsis {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }
      .intro-number {
        padding-top: 6px;
        font-size: 18px;
        font-weight:  bolder;
        line-height: 20px;
        color: #9797A1;
        margin: 0;
      }
      .intro-persent {
        font-size: 10px;
        font-weight:  bold;
        line-height: 20px;
        color: #9797A1;
      }
      .intro-detail {
        padding-top: 2px;
        font-size: 8px;
        line-height: 12px;
        color: #9797A1;
        margin-left: 10px;
      }
      .intro-detail_bottom{
        position:relative;
        bottom: -1px;
        display: flex;
        justify-content: space-between;
        transition: all .1s;
        .intro-detail_bottom_left {
          float: center;
          margin-left: 2px;
        }
        .intro-detail_bottom_right {
          float: right;
          margin-right: 7px;
        }
      }
    }
    .fl{
      float: left;
    }
    .f2{
      float: right;
    }
    .text-number-elepsis {
      text-align: center;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
}
.bg-white-panel {
  padding: 2px;
  font-size: 16px;
  font-weight: bolder;
  border-radius: 4px;
  margin-bottom: 2px;
}

</style>
